package io.github.xbeeant.eoffice.rest;

import io.github.xbeeant.core.ApiResponse;
import io.github.xbeeant.eoffice.model.User;
import io.github.xbeeant.eoffice.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.xml.ws.Action;
import java.util.List;

/**
 * @author xiaobiao
 * @version 2021/7/18
 */
@RestController
@RequestMapping("api/user")
public class UserRestController {
    @Autowired
    private IUserService userService;

    @GetMapping("search")
    public ApiResponse<List<User>> search(String k) {
        return userService.search(k);
    }
}
